package com.cheng.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.cheng.domain.base.TakeTime;

public interface TaketimeDao extends JpaRepository<TakeTime, Integer> ,JpaSpecificationExecutor<TakeTime> {

	@Query("update TakeTime set status = '1' where id = ?")
	@Modifying
	void cancelTaketime(Integer id);

	@Query("update TakeTime set status = '0' where id = ?")
	@Modifying
	void restoreTaketime(Integer id);

}
